www.gusucode.com > 支持向量机工具箱 - LIBSVM OSU_SVM LS_SVM源码程序 > 支持向量机工具箱 - LIBSVM OSU_SVM LS_SVM\stprtool\datasets\chgnum.m
function [I]=chgnum(I,oldValue,newValue) % [I]=chgnum(I,oldValue,newValue) % % CHGNUM chages oldValue(s) from the vector I to % corresponding newValue(s) and returns the result. % In other words it performs % % for j = 1:length(oldValue), % I( find( I == oldValue(j) ) ) = newValue(j); % end % % Statistical Pattern Recognition Toolbox, Vojtech Franc, Vaclav Hlavac % (c) Czech Technical University Prague, http://cmp.felk.cvut.cz % Written Vojtech Franc (diploma thesis) 02.01.2000 % Modifications % 9-jan-2001 created for j = 1:length(oldValue), I( find( I == oldValue(j) ) ) = newValue(j); end return;